home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_12_10
/
saks
/
clear.cpp
< prev
next >
Wrap
Text File
|
1994-08-08
|
322b
|
17 lines
Listing 3 - A member function, clear, that discards all the elements in
a queue that has elements of type T.
// destroy all in the elements in a queue
void Tq::clear()
{
cell *p;
while (first != 0)
{
p = first;
first = first->next;
delete p;
}
}